﻿cmake_minimum_required(VERSION 3.1.0)
project(LeftVentricle)

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_CXX_STANDARD 11)

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${PROJECT_SOURCE_DIR}/bin)

find_package(Qt5
    REQUIRED
    COMPONENTS
    Core
    )

find_package(Torch REQUIRED)
include_directories(  ${TORCH_INCLUDE_DIRS} )

find_package(VTK REQUIRED)
include(${VTK_USE_FILE})

find_package(ITK REQUIRED)
include(${ITK_USE_FILE})

find_package(OpenCV REQUIRED)
include_directories(  ${OpenCV_INCLUDE_DIRS} )

find_package(CGAL REQUIRED)
include(${CGAL_USE_FILE})
find_package(Eigen3 REQUIRED)
include( ${EIGEN3_USE_FILE} )


option(BUILD_SHARED_LIBS "" OFF)
option(USE_SYSTEM_VTK "" ON)
option(USE_SYSTEM_ITK "" ON)

set(Source
    athread.h
    athread.cpp
    form.cpp
    form.h
    main.cpp)

add_executable(${PROJECT_NAME}
    ${Source}
    )

target_link_libraries(
    ${PROJECT_NAME}
    ${ITK_LIBRARIES}
    )
target_link_libraries(
    ${PROJECT_NAME}
    ${VTK_LIBRARIES}
    )
target_link_libraries(
    ${PROJECT_NAME}
    "${TORCH_LIBRARIES}"
    )
target_link_libraries(
    ${PROJECT_NAME}
    "${CGAL_LIBS}"
    )
target_link_libraries(
    ${PROJECT_NAME}
    Qt5::Core
    )
target_link_libraries(
    ${PROJECT_NAME}
    ${OpenCV_LIBS}
    "opencv_core"
    "opencv_highgui"
    "opencv_imgcodecs"
    "opencv_imgproc"
    "dl")


